<template>
  <div style="margin-top:30px">
    <el-form ref="form" :model="form" label-width="100px" :rules="rules">
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="入驻商" style="margin-right:15px" prop="shipmentCode">
              <el-input v-model="form.shipmentName"  style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="状态名称" style="margin-right:15px" prop="name">
              <el-input v-model="form.name"  style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="是否可发货" style="margin-right:15px" prop="isConsignment">
              <el-select v-model="form.isConsignment" clearable style="width:100%" :disabled="true">
                <el-option value="0" label="是"/>
                <el-option value="1" label="否"/>
              </el-select>

            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="备注" style="margin-right:15px">
              <el-input v-model="form.remarks"  style="width:100%" :disabled="true"/>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import Vue from 'vue'
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/index.css'
import { inventoryStatusDetail } from '@/api/basicInfo'

Vue.use(VXETable)
export default {
  props: {
    operationCode: {
      type: String,
      required: true
    }
  },
  name: 'Child',
  data() {
    return {
      form: {
        brandNumber:'',               //品牌编码 ,
        code:'',                      //数据标识 ,
        name:'',                      //名称 ,
        remarks:'',                   //备注 ,
        shipmentCode:'',              //所属入驻商 ,
      },
        rules: {
          brandNumber: [
            {required: true, message: '请输入品牌编码', trigger: 'blur'},
          ],
          name: [
            {required: true, message: '请输入品牌名称', trigger: 'blur'},
          ],
          shipmentCode: [
            {required: true, message: '请选择所属入驻商', trigger: 'blur'},
          ],
        },
    }
  },
  created() {
    this.getInfo()
  },
  methods: {
    // 获取页面信息
    getInfo() {
      inventoryStatusDetail(this.operationCode).then(response => {
        this.form = response.data
      })
    }

  }
}
</script>
<style lang="scss" scoped>
    .dialog-footer {
        margin-top: 50px;
    }
</style>
